package com.lyf.scm.common.util;

/**
 * 渠道工具类
 * 鲲鹏渠道和大数据渠道转换
 *
 * @author Martin
 * @date 2020-11-11 10:37
 */
public class ChannelUtil {

    public static String getKpChannel(String bigDataChannel) {
        String res = null;
        switch (bigDataChannel) {
            case "01":
                res = "C00001";
                break;
            case "04":
                res = "C00002";
                break;
            case "03":
                res = "C00003";
                break;
            case "02":
                res = "C00004";
                break;
            case "77":
                res = "C00006";
                break;
            case "78":
                res = "C00005";
                break;
            default:
                break;
        }
        return res;
    }

    public static String getBigdataChannel(String kpChannel) {
        String res = null;
        if (kpChannel == null) {
            return null;
        }
        switch (kpChannel) {
            case "C00001":
                res = "01";
                break;
            case "C00002":
                res = "04";
                break;
            case "C00003":
                res = "03";
                break;
            case "C00004":
                res = "02";
                break;
            case "C00006":
                res = "77";
                break;
            case "C00005":
                res = "78";
                break;
            default:
                break;
        }
        return res;
    }
}
